import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use (VueRouter)
const {  name  } = require('../package.json')
let preFix = '/'
if(window.__POWERED_BY_QIANKUN__){
    preFix='/micrApp/'+name+'/'
}
const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('views/Main.vue'),
        meta: {title: '实验室管理'},
        children: [
            {
                path:preFix+'acManage',
                name: 'acManage',
                title: '门禁申请',
                key: '0',
                component: () => import('src/views/lab/acManage'),
                meta: {
                    title: ',',
                    key: '0',
                },
                children: []
            },
            {
                path:preFix+'labManage',
                name: 'labManage',
                title: '实验室管理',
                key: '0',
                component: () => import('src/views/lab/labManage'),
                meta: {
                    title: ',',
                    key: '1',
                },
                children: []
            },
            {
                path:preFix+'labApprove',
                name: 'labApprove',
                title: '门禁审批',
                key: '0',
                component: () => import('src/views/lab/labApprove'),
                meta: {
                    title: ',',
                    key: '2',
                },
                children: []
            },
            {
                path:preFix+'labEmpower',
                name: 'labEmpower',
                title: '门禁审批',
                key: '0',
                component: () => import('src/views/lab/labEmpower'),
                meta: {
                    title: ',',
                    key: '3',
                },
                children: []
            },{
                path:preFix+'materialManage',
                name: 'materialManage',
                title: '物料管理',
                key: '0',
                component: () => import('src/views/lab/materialManage'),
                meta: {
                    title: ',',
                    key: '4',
                },
                children: []
            },{
                path:preFix+'entryManage',
                name: 'entryManage',
                title: '入账管理',
                key: '0',
                component: () => import('src/views/lab/entryManage'),
                meta: {
                    title: ',',
                    key: '4',
                },
                children: []
            },{
                path:preFix+'orderManage',
                name: 'orderManage',
                title: '订单管理',
                key: '0',
                component: () => import('src/views/lab/orderManage'),
                meta: {
                    title: ',',
                    key: '5',
                },
                children: []
            },{
                path:preFix+'courseManage',
                name: 'courseManage',
                title: '课程管理',
                key: '0',
                component: () => import('src/views/lab/courseManage'),
                meta: {
                    title: ',',
                    key: '6',
                },
                children: []
            },{
                path:preFix+'scheduleManage',
                name: 'scheduleManage',
                title: '课程管理',
                key: '0',
                component: () => import('src/views/lab/scheduleManage/scheduleTable'),
                meta: {
                    title: ',',
                    key: '7',
                },
                children: []
            },{
                path:preFix+'repairManage',
                name: 'repairManage',
                title: '报修管理',
                key: '0',
                component: () => import('src/views/lab/repairManage'),
                meta: {
                    title: ',',
                    key: '8',
                },
                children: []
            },{
                path:preFix+'competitionManage',
                name: 'competitionManage',
                title: '竞赛管理',
                key: '0',
                component: () => import('src/views/lab/competitionManage'),
                meta: {
                    title: ',',
                    key: '9',
                },
                children: []
            },{
                path:preFix+'lessonManage',
                name: 'lessonManage',
                title: '课堂管理',
                key: '0',
                component: () => import('src/views/lab/lessonManage'),
                meta: {
                    title: ',',
                    key: '11',
                },
                children: []
            },{
                path:preFix+'labScoreManage',
                name: 'labScoreManage',
                title: '课堂管理',
                key: '0',
                component: () => import('src/views/lab/labScoreManage'),
                meta: {
                    title: ',',
                    key: '11',
                },
                children: []
            },{
                path:preFix+'labApproveStatistic',
                name: 'labApproveStatistic',
                title: '授权统计',
                key: '0',
                component: () => import('src/views/lab/labApprove/statistic.vue'),
                meta: {
                    title: ',',
                    key: '12',
                },
                children: []
            },
        ]
    },
]
export default routes
